package com.lesso.cyg.sunflower.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 设备数据传输对象
 *
 * @author cyg
 * @since 2025-07-02
 */
@Data
public class DeviceDTO implements Serializable {
    private static final long serialVersionUID = 20250702L;

    @NotBlank(message = "设备编码不能为空")
    @Length(max = 50, message = "设备编码不能超过50个字符")
    private String deviceCode;

    @NotBlank(message = "设备名称不能为空")
    @Length(max = 100, message = "设备名称不能超过100个字符")
    private String deviceName;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime testFormatTime;
}